package vue;
import java.awt.*;
import java.awt.event.WindowEvent;
import java.awt.event.WindowListener;
import java.awt.image.ImageObserver;

import javax.swing.ImageIcon;
import javax.swing.JPanel;
import vue.util.*;

/**
 * La classe <b>PanneauApropos</b> represente le panneau a propos
 * ou le texte (auteurs,encadrant,etc) va etre affiche
 * @since JAVA 1.5
 */
public class PanneauApropos extends JPanel implements WindowListener
{
	private static final long serialVersionUID = 1L;
	/**Panneau de defilement du texte*/
	private Defile d;
	
	/**
	 * CONSTRUCTEUR : definit le panneau avec l'objet de type Defile
	 * notamment
	 */
	public PanneauApropos()
	{
		this.setLayout(null);
		this.setBackground(Color.WHITE);
		
		d = new Defile();		
		d.setBounds(150,0,400,450);
		
		this.add(d);
		this.setVisible(true);
	}
	
	/**
	 * Donne le panneau de defilement du texte
	 * @return d de type Defile
	 */
	public Defile getDefile()
	{
		return d;
	}		
	
	public void paintComponent(Graphics g)
	{
		super.paintComponent(g);		
		g.drawImage(Util.createImage("img/um2.gif"),10,10,null);
		g.drawImage(Util.createImage("img/simplexe.jpg"),0,105,null);
	}

	public void windowOpened(WindowEvent e){}

	public void windowClosing(WindowEvent e) 
	{
		d.stop();
	}

	public void windowClosed(WindowEvent e){}

	public void windowIconified(WindowEvent e){}

	public void windowDeiconified(WindowEvent e){}

	public void windowActivated(WindowEvent e){}

	public void windowDeactivated(WindowEvent e){}
}